<?php /*a:4:{s:75:"E:\soft\phpstudy_pro\WWW\dw\application\admin\view\orders\order_detail.html";i:1595213003;s:67:"E:\soft\phpstudy_pro\WWW\dw\application\admin\view\public\base.html";i:1577070354;s:69:"E:\soft\phpstudy_pro\WWW\dw\application\admin\view\public\header.html";i:1577071515;s:69:"E:\soft\phpstudy_pro\WWW\dw\application\admin\view\public\footer.html";i:1577071509;}*/ ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->


<link rel="stylesheet" type="text/css" href="/static/css/boxImg.css">
<style type="text/css">
	.attrs{margin-top:5px;}
	.attrname{width:100px;border:solid 1px #ddd;height:31px;font-size:14px;padding-left:4px;}
	.attrval{width:40%;border:solid 1px #ddd;height:31px;font-size:14px;padding-left:4px;}
	.status{width:60px;height:60px;background-color:#dddddd;border-radius:30px;float:left;text-align: center;margin-right:10px;}
	.status p{font-size:10px;color:#ffffff;margin-bottom:0;}
	.status p:first-child{margin-top:10px;}
	.active{background-color:#2eb51c !important;}
</style>
<title>详情</title>
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
		<input type="hidden" class="input-text" value="<?php echo htmlentities($data['id']); ?>" id="id" name="id">
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">订单号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['ordernosub']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['title']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">图片：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<img modal="zoomImg" style="width:25%" src="<?php echo htmlentities($data['img']); ?>">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">规格参数：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['combination']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">单价：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['price']); ?>
			</div>
			
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">购买量：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['buy_num']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">支付费用：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['pay_fee']); if($data['state']==1): ?>
					<a title="打折" href="javascript:;" onclick="price_edit('打折','<?php echo url('price_edit'); ?>?id=<?php echo htmlentities($data['id']); ?>',<?php echo htmlentities($data['id']); ?>,'300','200')" class="ml-5 btn-primary radius" style="text-decoration:none">打折</a>
				<?php endif; if($data['discount']): ?>
					原:<?php echo htmlentities($data['f_pay_fee']); ?>;&nbsp;&nbsp;折扣:<?php echo htmlentities($data['discount']); ?>;&nbsp;&nbsp;备注:<?php echo htmlentities($data['remarks']); ?>
				<?php endif; ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">姓名：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['name']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">电话：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['phone']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">地址：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo htmlentities($data['address']); ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">发票：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php if($data['is_invoice']==1): ?>
				否
				<?php elseif($data['is_invoice']==2): if($data['company_name']||$data['invoice_no']): ?>
						单位:<?php echo htmlentities($data['company_name']); ?>/<?php echo htmlentities($data['invoice_no']); ?>/<?php echo htmlentities($data['invoice_address']); ?>/<?php echo htmlentities($data['invoice_phone']); ?>/<?php echo htmlentities($data['invoice_bank']); ?>/<?php echo htmlentities($data['invoice_bank_no']); else: ?>
						个人
					<?php endif; if($data['is_invoiced']==1): ?>
					<input  onClick="invoicing(<?php echo htmlentities($data['id']); ?>);" class="btn-primary radius" type="button" value="&nbsp;&nbsp;待开&nbsp;&nbsp;">
					<?php elseif($data['is_invoiced']==2): ?>
					<input class="btn-default radius" type="button" value="&nbsp;&nbsp;已开&nbsp;&nbsp;">
					<?php endif; ?>
				<?php endif; ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">状态：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php if($data['state']==1): ?>
				待付款 <input  onClick="pay_edit(<?php echo htmlentities($data['id']); ?>);" class="btn-primary radius" type="button" value="&nbsp;&nbsp;改为已付款&nbsp;&nbsp;">
				<?php elseif($data['state']==2): ?>
				待发货
				<?php elseif($data['state']=3): ?>
				待收货
				<?php elseif($data['state']==4): ?>
				已完成
				<?php elseif($data['state']==5): ?>
				售后
				<?php elseif($data['state']==6): ?>
				已取消
				<?php endif; ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">快递方式：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php if($data['express_style']==1): ?>
				普通快递
				<?php elseif($data['express_style']==2): ?>
				自提
				<?php elseif($data['express_style']=3): ?>
				货到付款
				<?php endif; ?>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">下单时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo date('Y-m-d H:i:s',$data['time']); ?>
			</div>
		</div>

		<?php if($data['fktime']): ?>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">付款时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo date('Y-m-d H:i:s',$data['fktime']); ?>
			</div>
		</div>
		<?php endif; if($data['fhtime']): ?>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">发货时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<?php echo date('Y-m-d H:i:s',$data['fhtime']); ?>
			</div>
		</div>
		<?php endif; if($data['state']==2): if($data['express_style']==1): ?>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递公司：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value="<?php echo htmlentities($data['express_company']); ?>" placeholder="快递公司" id="express_company" name="express_company">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递单号：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value="<?php echo htmlentities($data['express_no']); ?>" placeholder="快递单号" id="express_no" name="express_no">
					</div>
				</div>
				<div class="row cl">
					<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
						<input id="submit" class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;发货&nbsp;&nbsp;">
					</div>
				</div>
			<?php else: ?>
				<div class="row cl">
					<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
						<input  onClick="confirm_order(<?php echo htmlentities($data['id']); ?>);" class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;自提&nbsp;&nbsp;">
					</div>
				</div>
			<?php endif; else: if($data['state']==1&&$data['express_style']==3): ?>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递公司：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value="<?php echo htmlentities($data['express_company']); ?>" placeholder="快递公司" id="express_company" name="express_company">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递单号：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value="<?php echo htmlentities($data['express_no']); ?>" placeholder="快递单号" id="express_no" name="express_no">
					</div>
				</div>
				<div class="row cl">
					<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
						<input id="submit" class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;发货&nbsp;&nbsp;">
					</div>
				</div>
				<?php else: ?>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递公司：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<?php echo htmlentities($data['express_company']); ?>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-3 col-sm-2">快递单号：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<?php echo htmlentities($data['express_no']); ?>
					</div>
				</div>
			<?php endif; ?>
			
		<?php endif; if($back): ?>
			<div style="border-top:1px dashed #999999;margin:10px auto;"></div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">退货退款</label>
				<div class="formControls col-xs-8 col-sm-9">
				</div>
			</div>
			
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">原因：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php echo htmlentities($back['reason']); ?>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">留言说明：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php echo htmlentities($back['message']); ?>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">申请时间：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php echo date('Y-m-d H:i:s',$back['time']); ?>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">状态：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php if($back['state']==1): if($data['state']==5): ?>
							<span class="label label-success radius" style="cursor:pointer;" onClick="agree_on(<?php echo htmlentities($back['id']); ?>);">同意</span>
						<?php else: ?>
							申请中
						<?php endif; elseif($back['state']==2): ?>
					已同意
					<?php elseif($back['state']==3): if($data['state']==5): ?>
							<span class="label label-danger radius" style="cursor:pointer;" onClick="money_on(<?php echo htmlentities($back['id']); ?>);">退款</span>
						<?php else: ?>
							退款
						<?php endif; elseif($back['state']==4): ?>
					已撤销
					<?php elseif($back['state']==5): ?>
					退款成功
					<?php endif; ?>
					<i style="font-size:10px;">(1:申请中“同意”;2:已同意;3退款;4已撤销;5退款成功)</i>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">快递公司：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php echo htmlentities($back['express_company']); ?>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">快递单号：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<?php echo htmlentities($back['express_no']); ?>
				</div>
			</div>
		<?php endif; ?>

	</form>
</article>


<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript" src="/static/js/boxImg.js"></script>
<script type="text/javascript">
// $("#submit").click(function() {
// 	layer.load(1, {
// 	  shade: [0.1,'#fff'] //0.1透明度的白色背景
// 	});
// 	var id=$("input[name=id]").val();
// 	var express_company=$("input[name=express_company]").val();
// 	var express_no=$("input[name=express_no]").val();
//     $.ajax({
// 	    type: 'POST',
// 	    url: "<?php echo url('order_detail'); ?>",
// 	    data: {id:id,express_company:express_company,express_no:express_no},
// 	    success: function(resdata){
// 	        if(resdata.code==200){
// 				layer.msg(resdata.msg,{icon:1,time:1000});
// 				setTimeout("parent.location.reload()",1000);
// 	        }else{
// 				layer.msg(resdata.msg,{icon:2,time:3000});
// 	        }
// 	    },
// 	    error: function(){
// 			layer.msg('数据保存失败',{icon:2,time:3000});
// 	    }
// 	})
// })
function agree_on(id){
	layer.confirm('确定吗？',function(index){
		$.ajax({
			type: 'POST',
			url: 'agree_on',
			data:{id:id},
			success: function(data){
				if(data.code==200){
		            location.reload()
		        }else{
					layer.msg(data.msg,{icon:2,time:3000});
		        }
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}
function money_on(id){
	layer.confirm('确认要放款？',function(index){
		$.ajax({
			type: 'POST',
			url: 'money_on',
			data:{id:id},
			success: function(data){
				if(data.code==200){
		            location.reload()
		        }else{
					layer.msg(data.msg,{icon:2,time:3000});
		        }
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}
// function confirm_order(id){
// 	layer.confirm('确认自提？',function(index){
// 		$.ajax({
// 			type: 'POST',
// 			url: 'confirm_order',
// 			data:{id:id},
// 			success: function(data){
// 				if(data.code==200){
// 		            location.reload()
// 		        }else{
// 					layer.msg(data.msg,{icon:2,time:3000});
// 		        }
// 			},
// 			error:function(data) {
// 				console.log(data.msg);
// 			},
// 		});		
// 	});
// }
// function pay_edit(id){
// 	layer.confirm('确认改为已付款？',function(index){
// 		$.ajax({
// 			type: 'POST',
// 			url: 'pay_edit',
// 			data:{id:id},
// 			success: function(data){
// 				if(data.code==200){
// 		            location.reload()
// 		        }else{
// 					layer.msg(data.msg,{icon:2,time:3000});
// 		        }
// 			},
// 			error:function(data) {
// 				console.log(data.msg);
// 			},
// 		});		
// 	});
// }
// function invoicing(id){
// 	layer.confirm('确认已开发票？',function(index){
// 		$.ajax({
// 			type: 'POST',
// 			url: 'invoicing',
// 			data:{id:id},
// 			success: function(data){
// 				if(data.code==200){
// 		            location.reload()
// 		        }else{
// 					layer.msg(data.msg,{icon:2,time:3000});
// 		        }
// 			},
// 			error:function(data) {
// 				console.log(data.msg);
// 			},
// 		});		
// 	});
// }
// function price_edit(title,url,id,w,h){
// 	layer_show(title,url,w,h);
// }
</script> 

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
</body>
</html>